package com.study.demo.controller;

import com.study.demo.domain.UserDO;
import com.study.demo.service.UserServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    private static final Logger logger = LoggerFactory.getLogger(UserController.class);

    @Autowired
    private UserServiceImpl userService;

    @GetMapping(value = "/getAllUsers")
    public List<UserDO> getAllUsers() {
        List<UserDO> list = userService.getAllUsers();
        return list;
    }


}
